<?php

namespace Jb\Utils;

use Jb\Object,
    Jb\Utils\Comparison\Comparable;

class String extends Object implements Comparable {

    private $textString;

    public function __construct($textString) {
        $this->textString = $textString;
    }

    public function compareTo(Object $comparableObject) {
        if($this->toString() == (string) $comparableObject->toString()) {
            return true;
        } else {
            return false;
        }
    }

    public function toString() {
        return (string) $this->textString;
    }

}
?>
